package com.dms.model;



import com.dms.bean.Fix;
import com.dms.bean.Student;
import com.dms.dao.FixDao;
import com.dms.dao.StudentDao;



public class FixModel {
	public static boolean add(Student stu,String content) {
		boolean val = false;
		if (stu!=null&&content !="") {
			
			try {
				Student stu1 = StudentDao.find(stu.getStuID());
				
				Fix fix = new Fix();
				fix.setContent(content);
				System.out.print(stu1.getDormID());
				fix.setDormID(stu1.getDormID());
				fix.setName(stu1.getName());
				fix.setStuID(stu1.getStuID());
				FixDao.add(fix);
				val=true;
			}
			catch (Exception e) {
				e.printStackTrace();
			}
			
		}
		return val;
	}
	
}
